
#pragma once

#include <iostream>
#include <fstream>
#include <vector>
#include <map>
#include <string>

#define DATA_BUFFER_SIZE	100
#define MAX_FILE_NAME_SIZE	256

struct DataNode
{
	char Name[DATA_BUFFER_SIZE];
	std::map<std::string,float> DataParameters;
};

class FileParser
{
public:

	// Public Ctors and Dtors
	FileParser();
	FileParser(const char *FileName);

	~FileParser();

	// High level interface
	void NewFile(const char *FileName);
	int ParseFile(void);

	// Low level interface and accessors
	std::vector<DataNode> *GetData() {return &Data;}
private:

	// Private interface
	void DeleteTree();
	void AddLeaf();

	// Private data members
	std::vector<DataNode> Data;
	char FileName[MAX_FILE_NAME_SIZE];
};
